package com.swh.qa.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.swh.base.entity.Result;
import com.swh.base.entity.StatusCode;

/**
 * 统一异常处理类
 */
//@ControllerAdvice
public class BaseExceptionHandler {

    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    public Result error(Exception e){
        e.printStackTrace();
        return new Result(StatusCode.ERROR,  "执行出错");
    }
}
